<include file="public:header"/>

<div class="toptit">添加个人会员</div>
<form id="form1" action="{:U('member_add')}" method="post">
    <div class="form_main width150">
        <div class="fl">用户名:</div>
        <div class="fr">
            <input name="username" type="text" class="input_text_default middle" maxlength="25" value=""/>
        </div>
        <div class="fl">手机号:</div>
        <div class="fr">
            <input name="mobile" type="text" class="input_text_default middle" maxlength="11" value=""/>
        </div>
        <div class="fl">邮箱地址:</div>
        <div class="fr">
            <input name="email" type="text" class="input_text_default middle" maxlength="25" value=""/>
        </div>
        <div class="fl">登录密码:</div>
        <div class="fr">
            <input name="password" type="password" class="input_text_default middle" maxlength="25" value=""/>
        </div>
        <div class="fl">再次输入密码:</div>
        <div class="fr">
            <input name="repassword" type="password" class="input_text_default middle" maxlength="25" value=""/>
        </div>
        <div class="fl"></div>
        <div class="fr">
            <input type="hidden" name="utype" value="2"/>
            <input type="button" class="admin_submit" value="添加" id="J_submit"/>
            <input type="button" class="admin_submit" value="返回" onclick="window.location.href='{:U('member_list')}'"/>
        </div>
        <div class="clear"></div>
    </div>
</form>

</div>
<include file="public:footer"/>
</body>
<script type="text/javascript">
    $('#J_submit').click(function(){
            var that = $(this);
            if(that.hasClass('disabled')){
                return false;
            }
            that.val('正在保存...').addClass('disabled');
            $.post("{:U('member_add')}",$('#form1').serialize(),function(result){
                if(result.status==1){
                    disapperTooltip("success", result.msg,function(){
                        location.reload();
                    });
                }else{
                    disapperTooltip("remind", result.msg,function(){
                        that.val('保存修改').removeClass('disabled');
                    });
                    return false;
                }
            },'json');
        });
</script>
</html>